
@extends('layouts.master3')
@section('title')
{{"设置简历"}}
@stop

@section('css')
<link rel="stylesheet" href="/css/bootstrap-datetimepicker.min.css"/>
<link rel="stylesheet" href="/css/bootstrapValidator.min.css"/>

<link rel="stylesheet" href="/css/jquery.fileupload.css">
<link rel="stylesheet" href="/css/jquery.fileupload-ui.css">
<link href="/css/resume.css" rel="stylesheet">
<link href="/css/talents.css" rel="stylesheet">
@stop

@section('content')
<div class="alert alert-success" role="alert" style="position: fixed;top: 0;width:100%;text-align: center;display: none;z-index:1">
        <strong>保存成功!</strong>
</div>

<div class="contain">
<input type="hidden" name="_token" value="{{csrf_token()}}">
	<div class="talents-sidebar inline">
        	<div class="talents-title">
            	<a href="/talent/resume" class="title tab active" data-target="interview-resume">我的简历</a>
        	</div>
        	<div class="talents-title">
            	<a href="/talent" class="title tab" data-target="interview-consult">面试咨询</a>
        	</div>
        	<div class="talents-title">
            	<a href="/talent#myWork" class="title tab" data-target="interview-work">推荐工作 </a>
            	<ul>
					<li><a href="/talent#myInvite" class="tab invit" data-mark="invit" data-target="interview" data-url="/talent/invit">面试邀请 <span class="res"><?php echo $not_cnt; ?>/<?php echo $all_cnt; ?></span></a></li>
                	<li><a href="/talent#myInterview" class="tab interview" data-mark="interview" data-target="interview" data-url="/talent/interview">面试 <span class="res"><?php echo $interview_cnt; ?></span></a></li>
                	<li><a href="/talent#myResult" class="tab result" data-mark="result" data-target="interview" data-url="/talent/result">面试结果 <span class="res"><?php echo $result_cnt; ?></span></a></li>
            	</ul>
        	</div>
    	</div>
	<div class="talents-inbox">
		<section class="section-tab interview-resume" style="display:block;background:#f6f6f6">
        <section class="resume-sec">
            <!-- basic info S-->
            <div class="title" id="basicTitle">
                <span class="text">基本信息</span>
            </div>
            <div class="content">
				<form action="/resume/save_resume" id="basic">
				<input type="hidden" name="_token" value="{{csrf_token()}}">
                    <!-- name S-->
                    <div class="form-group">
                        <label for="realname" class=" control-label">姓名</label>

                        <div class="group">
						<input class="form-control name-input" id="name" type="text" value="<?php if($resume!=NULL) echo$resume->realname;?>" name="realname" />
                        </div>
                    </div>
                    <!-- name E-->
                    <!-- sex S-->
                    <div class="form-group">
                        <label class=" control-label">性别</label>

                        <div class="group sex_block">
                            <a href="javascript:;" class=" sex_select 
									<?php if($resume==NULL || $resume->sex != "女") echo "selected";?>" data-sex="男">男</a>
                            <a href="javascript:;" class=" sex_select <?php if($resume!=NULL && $resume->sex == "女") echo "selected";?>" data-sex="女">女</a>
                            <input type="hidden" name="sex" value="男"/>
                        </div>
                    </div>
                    <!-- sex E-->
                    <!-- birthday S-->
                    <div class="form-group">
                        <label for="birthday" class=" control-label">出生日期</label>

                        <div class="group form_date">
						<input class="form-control date-input birthday" id="birthday" name="birthday" type="text" value="<?php if($resume!=NULL) echo $resume->birthday;?>" readonly/>
                        </div>
                    </div>
                    <!-- birthday E-->
                    <!-- work-year S-->
                    <div class="form-group">
                        <label for="working_years" class=" control-label">工作年限</label>

                        <div class="group ">
                            <select class="form-control" id="workYear" name="working_years">
                                <option value="1" <?php if($resume==NULL || $resume->working_years == "1年") echo "selected"?>>1年</option>
                                <option value="2" <?php if($resume!=NULL && $resume->working_years == "2年") echo "selected"?>>2年</option>
                                <option value="3" <?php if($resume!=NULL && $resume->working_years == "3年") echo "selected"?>>3年</option>
                                <option value="4" <?php if($resume!=NULL && $resume->working_years == "4年") echo "selected"?>>4年</option>
                                <option value="5" <?php if($resume!=NULL && $resume->working_years == "5年") echo "selected"?>>5年</option>
                                <option value="6" <?php if($resume!=NULL && $resume->working_years == "6年") echo "selected"?>>6年</option>
                                <option value="7" <?php if($resume!=NULL && $resume->working_years == "7年") echo "selected"?>>7年</option>
                                <option value="8" <?php if($resume!=NULL && $resume->working_years == "8年") echo "selected"?>>8年</option>
                                <option value="more" <?php if($resume!=NULL && $resume->working_years == "8年以上") echo "selected"?>>8年以上</option>
                            </select>
                        </div>
                    </div>
                    <!-- work-year E-->
                    <!-- city S-->
                    <div class="form-group">
                        <label for="city" class=" control-label">所在城市</label>

                        <div class="group ">
                            <select class="form-control city" id="pro" name="in_province">
                                <option><?php if($resume!=NULL && $resume->in_province!=NULL) echo $resume->in_province; else echo "浙江省";?></option>
                                <option>北京市</option>
                                <option>上海市</option>
                                <option>天津市</option>
                                <option>重庆市</option>
                                <option>河北省</option>
                                <option>山西省</option>
                                <option>内蒙古自治区</option>
                                <option>辽宁省</option>
                                <option>吉林省</option>
                                <option>黑龙江省</option>
                                <option>江苏省</option>
                                <option>浙江省</option>
                                <option>安徽省</option>
                                <option>福建省</option>
                                <option>江西省</option>
                                <option>山东省</option>
                                <option>河南省</option>
                                <option>湖北省</option>
                                <option>湖南省</option>
                                <option>广东省</option>
                                <option>广西壮族自治区</option>
                                <option>海南省</option>
                                <option>四川省</option>
                                <option>贵州省</option>
                                <option>云南省</option>
                                <option>西藏自治区</option>
                                <option>陕西省</option>
                                <option>甘肃省</option>
                                <option>宁夏回族自治区</option>
                                <option>青海省</option>
                                <option>新疆维吾尔族自治区</option>
                                <option>香港特别行政区</option>
                                <option>澳门特别行政区</option>
                                <option>台湾省</option>
                                <option>其它</option>
                            </select>
                            <select class="form-control city" id="city" name="in_city" data-city=<?php if($resume!=NULL) echo $resume->in_city;?>>
                                <option><?php if($resume!=NULL) echo $resume->in_city;?></option>
                                <option>杭州</option>
                                <option>宁波</option>
                                <option>温州</option>
                                <option>嘉兴</option>
                                <option>湖州</option>
                                <option>绍兴</option>
                                <option>金华</option>
                                <option>衢州</option>
                                <option>舟山</option>
                                <option>台州</option>
                                <option>丽水</option>
                            </select>
                        </div>
                    </div>
                    <!-- city E-->
                    <!-- telephone S-->
                    <div class="form-group">
                        <label for="telephone" class=" control-label">手机</label>
                        <div class="group ">
                            <input class="form-control telephone-input" id="telephone" name="phone_number" type="text" value="<?php if($resume!=NULL) echo $resume['phone_number'];?>" />
                        </div>
                    </div>
                    <!-- telephone E-->
                    <div class="sub">
                        <button class="save-btn disabled basic" disabled>保存</button>
                    </div>
                </form>

            </div>



        </section>

        <section class="resume-sec">
            <!-- work hope S-->
            <div class="title">
                <span class="text">期望工作</span>
            </div>
            <div class="content">
                <!-- workPlace S-->
                <div class="form-group">
                    <label for="workPlace" class=" control-label">工作地点</label>

                    <div class="group">
                        <select class="form-control" id="expect_city" name="expect_city">
                            <option value="杭州" <?php if($resume==NULL || $resume->expect_city == "杭州") echo "selected";?>>杭州</option>
                            <option value="北京" <?php if($resume!=NULL && $resume->expect_city == "北京") echo "selected";?>>北京</option>
                            <option value="上海" <?php if($resume!=NULL && $resume->expect_city == "上海") echo "selected";?>>上海</option>
                            <option value="广州" <?php if($resume!=NULL && $resume->expect_city == "广州") echo "selected";?>>广州</option>
                            <option value="深圳" <?php if($resume!=NULL && $resume->expect_city == "深圳") echo "selected";?>>深圳</option>
                        </select>
                    </div>
                </div>
                <!-- workPlace E-->
                <!-- work S-->
                <div class="form-group">期望的工作岗位 (最多两项)
                    <div class="work-list">
                        <?php
                            $sklist = array(".Net工程师","安全工程师","Android工程师","运维","C/C++工程师","测试工程师","CTO",
                                "DBA","GO工程师","iOS工程师","Java工程师","技术经理","架构师","Node.js工程师","PHP工程师",
                                "Python工程师","前端工程师","Ruby工程师","Scala工程师","数据挖掘工程师","算法工程师",
                                "图形图像处理","游戏服务端工程师","游戏开发","游戏客户端工程师");
                            $cnt = count($sklist);
                            for($i=0; $i<$cnt; $i++) {
                                $checked = "";
                                if($resume!=NULL && strpos($resume['expect_job'], $sklist[$i])!==false) $checked="checked";
                                echo '<div class="item" >
                                <label for="sk'.$i.'" >
                                    <input type = "checkbox" name = "expect_job" id = "sk'.$i.'" value="'.$sklist[$i].'" '.$checked.' />
                                    <span class="skill-name" >'.$sklist[$i].' </span >
                                </label >
                                </div >';
                            }
                        ?>

                    </div>

                </div>
                <!-- work E-->

            </div>
            <div class="footer">
                <button class="save-btn disabled work" disabled>保存</button>
            </div>

            <!-- work hope E-->
        </section>

        <!-- education S-->
        <section class="resume-sec">
            <div class="title" id="eduTitle">
                <span class="text">教育经历</span>

                <div class="plus operate none"><i class="iconfont icon-jia"></i>新增</div>
                <div class="minus operate"><i class="iconfont icon-jian"></i>取消</div>
            </div>
            <div class="content edu ">
                <form action="/resume/save_edu" id="edu">
                   <input type="hidden" name="_token" value="{{csrf_token()}}">
                    <!-- school S-->
                    <div class="form-group">
                        <label for="school" class=" control-label">毕业学校</label>

                        <div class="group">
                            <input class="form-control name-input" id="school" type="text" value="" name="school"/>
                        </div>
                    </div>
                    <!-- school E-->
                    <!-- edu S-->
                    <div class="form-group">
                        <label for="education" class=" control-label">学历</label>

                        <div class="group ">
                            <select class="form-control" id="education" name="edu_bg">
                                <option value="博士">博士</option>
                                <option value="硕士">硕士</option>
                                <option value="本科">本科</option>
                                <option value="大专">大专</option>
                                <option value="其他">其他</option>
                            </select>
                        </div>
                    </div>
                    <!-- edu E-->
                    <!-- eduction time S-->
                    <div class="form-group">
                        <label class=" control-label">就读时间</label>

                        <div class="group">
                            <div class="inline">
                                <span class="input-group-addon" id="basic-addon1">开始</span>
                                <input class="form-control date-input eduTime start" id="eduTimeStart" name="begin_at" type="text" value="" readonly/>
                            </div>
                            <div class="inline">
                                <span class="input-group-addon">结束</span>
                                <input class="form-control date-input eduTime end" id="eduTimeEnd" name="end_at" type="text" value="" readonly/>
                            </div>
                            <div class="inline">
                                <label for="eduTimeNow">
                                    <input type="checkbox" id="eduTimeNow" class="now" /> <span class="eduTimeNow">现在</span>
                                </label>
                            </div>
                        </div>
                    </div>
                    <!-- eduction time E-->
                    <!-- edu major S-->
                    <div class="form-group">
                        <label for="major" class=" control-label">专业</label>

                        <div class="group">
                            <input type="text" class="form-control " id="major" name="major"/>
                        </div>
                    </div>
                    <!-- edu major E-->
                    <div class="sub">
                        <button class="save-btn disabled edu" disabled>保存</button>
                    </div>
                    <div class="edu-disabled shadow none"></div>
                    <!-- 当编辑教育经历的时候  ↑这个打开-->
                </form>

            </div>
            <!-- 包含已填写的记录和编辑该记录 S-->
            <div class="experience">
                <form action="/resume/update_edu" id="eduEdit">
					<input type="hidden" name="_token" value="{{csrf_token()}}" />
					<input type="hidden" name="id" value="" id="eduEditId" />
                    <!-- edit S-->
                    <div class="exp-edit edu none">
                        <div class="content">
                            <!-- school S-->
                            <div class="form-group">
                                <label for="schoolEdit" class=" control-label">毕业学校</label>

                                <div class="group">
                                    <input class="form-control name-input" id="schoolEdit" type="text" value="" name="school"/>
                                </div>
                            </div>
                            <!-- school E-->
                            <!-- edu S-->
                            <div class="form-group">
                                <label for="educationEdit" class=" control-label">学历</label>

                                <div class="group ">
                                    <select class="form-control" id="educationEdit" name="edu_bg">
                                        <option value="博士">博士</option>
                                        <option value="硕士">硕士</option>
                                        <option value="本科">本科</option>
                                        <option value="大专">大专</option>
                                        <option value="其他">其他</option>
                                    </select>
                                </div>
                            </div>
                            <!-- edu E-->
                            <!-- eduction time S-->
                            <div class="form-group">
                                <label class=" control-label">就读时间</label>

                                <div class="group">
                                    <div class="inline">
                                        <span class="input-group-addon">开始</span>
                                        <input class="form-control date-input eduTime start" id="eduTimeStartEdit" name="begin_at" type="text" value="" readonly/>
                                    </div>
                                    <div class="inline">
                                        <span class="input-group-addon">结束</span>
                                        <input class="form-control date-input eduTime end" id="eduTimeEndEdit" name="end_at" type="text" value="" readonly/>
                                    </div>
                                    <div class="inline">
                                        <label for="eduTimeNow">
                                            <input type="checkbox" id="eduTimeNowEdit" class="now" /> <span class="eduTimeNow">现在</span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <!-- eduction time E-->
                            <!-- edu major S-->
                            <div class="form-group">
                                <label for="majorEdit" class=" control-label">专业</label>

                                <div class="group">
                                    <input type="text" class="form-control " id="majorEdit" name="major" value=""/>
                                </div>
                            </div>
                            <!-- edu major E-->
                            <div class="sub">
                                <button class="save-btn enabled edu-edit-save" data-id="">保存</button>
                            </div>
                        </div>
                    </div>
                    <!-- edit E-->
                </form>

                <!-- exp item S-->
                <div class="exp-item edu">
                    <!-- show S-->
                       <?php 
                    $cnt = count($eduexps);
                    foreach($eduexps as $k=>$v){
                        echo '<div class="exp-show">
                    <div class="row">
                        <div class="col-sm-3">
                            <span class="school">'.$v["school"].'</span>
                        </div>
                        <div class="col-sm-3">
                            <span class="start_time">'.$v["begin_at"].'</span>  --  <span class="end_time">'.$v["end_at"].'</span>
                        </div>
                        <div class="col-sm-2">
                            <span class="degree">'.$v["edu_bg"].'</span>
                        </div>
                        <div class="col-sm-3">
                            <span class="major" style="word-break:break-all;">'.$v["major"].'</span>
                        </div>
                    </div>
                    <a class="edit-edu inline" href="javascript:;" data-id="'.$v["id"].'"><i class="iconfont icon-shezhi"></i></a>
                    <a class="del-edu inline" href="javascript:;" data-id="'.$v["id"].'"><i class="iconfont icon-lajitong"></i></a>
                    </div>';
                    } ?>
                    <!-- show E-->
                </div>
                <!-- exp item E-->

            </div>
            <!-- 包含已填写的记录和编辑该记录 E-->

        </section>
        <!-- education E-->

        <!-- work exp S-->
        <section class="resume-sec">
            <div class="title" id="workTitle">
                <span class="text">工作经历</span>

                <div class="plus operate none"><i class="iconfont icon-jia"></i>新增</div>
                <div class="minus operate"><i class="iconfont icon-jian"></i>取消</div>
            </div>
            <div class="content work">
                <form action="/resume/save_work" id="work">
					<input type="hidden" name="_token" value="{{csrf_token()}}">
                    <!-- company name S-->
                    <div class="form-group">
                        <label for="company" class=" control-label">公司名称</label>

                        <div class="group">
                            <input class="form-control name-input" id="company" type="text" value="" name="company"/>
                        </div>
                    </div>
                    <!-- company name E-->
                    <!-- job S-->
                    <div class="form-group">
                        <label for="job" class=" control-label">职位名称</label>

                        <div class="group">
                            <input class="form-control name-input" id="job" type="text" value="" name="job"/>
                        </div>
                    </div>
                    <!-- job E-->
                    <!-- time S-->
                    <div class="form-group">
                        <label class=" control-label">在职时间</label>

                        <div class="group">
                            <div class="inline">
                                <span class="input-group-addon">开始</span>
                                <input class="form-control date-input workTime start" id="workTimeStart" name="begin_at" type="text" value="" readonly/>
                            </div>
                            <div class="inline">
                                <span class="input-group-addon">结束</span>
                                <input class="form-control date-input workTime end" id="workTimeEnd" name="end_at" type="text" value="" readonly/>
                            </div>
                            <div class="inline">
                                <label for="eduTimeNow">
                                    <input type="checkbox" id="jobTimeNow" class="now" /> <span class="jobTimeNow">现在</span>
                                </label>
                            </div>
                        </div>
                    </div>
                    <!-- time E-->
                    <!-- work detail S-->
                    <div class="form-group">
                        <label for="workDetail" class=" control-label" style="vertical-align: top;">工作描述<br/>(项目经验)</label>

                        <div class="group">
                            <textarea name="exp" id="exp" placeholder="详细描述在这份工作中参与的项目内容，职责范围，使用技术等。"></textarea>
                        </div>
                    </div>
                    <!-- work detail D-->
                    <div class="sub">
                        <button class="save-btn disabled job" disabled>保存</button>
                    </div>
                    <div class="work-disabled shadow none"></div>
                </form>

            </div>

            <div class="experience">
                <form action="/resume/update_work" id="workEdit">
					<input type="hidden" name="_token" value="{{csrf_token()}}" />
					<input type="hidden" name="id" value="" id="expEdit" />
                    <!-- exp edit S-->
                    <div class="exp-edit none work">
                        <div class="content">
                            <!-- company name S-->
                            <div class="form-group">
                                <label for="companyEdit" class=" control-label">公司名称</label>

                                <div class="group">
                                    <input class="form-control name-input" id="companyEdit" type="text" value="" name="company"/>
                                </div>
                            </div>
                            <!-- company name E-->
                            <!-- job S-->
                            <div class="form-group">
                                <label for="jobEdit" class=" control-label">职位名称</label>

                                <div class="group">
                                    <input class="form-control name-input" id="jobEdit" type="text" value="" name="job"/>
                                </div>
                            </div>
                            <!-- job E-->
                            <!-- time S-->
                            <div class="form-group">
                                <label class=" control-label">在职时间</label>

                                <div class="group">
                                    <div class="inline">
                                        <span class="input-group-addon">开始</span>
                                        <input class="form-control date-input workTime start" id="workTimeStartEdit" name="begin_at" type="text" value="" readonly/>
                                    </div>
                                    <div class="inline">
                                        <span class="input-group-addon">结束</span>
                                        <input class="form-control date-input workTime end" id="workTimeEndEdit" name="end_at" type="text" value="" readonly/>
                                    </div>
                                    <div class="inline">
                                        <label for="eduTimeNow">
                                            <input type="checkbox" id="jobTimeNowEdit" class="now" /> <span class="jobTimeNowEdit">现在</span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <!-- time E-->
                            <!-- work detail S-->
                            <div class="form-group">
                                <label for="workDetailEdit" class=" control-label" style="vertical-align: top;">工作描述<br/>(项目经验)</label>

                                <div class="group">
                                    <textarea name="exp" id="workDetailEdit" placeholder="详细描述在这份工作中参与的项目内容，职责范围，使用技术等。"></textarea>
                                </div>
                            </div>
                            <!-- work detail D-->
                            <div class="sub">
                                <button class="save-btn enabled job-edit-save">保存</button>
                            </div>
                        </div>
                    </div>
                    <!-- exp edit E -->
                </form>

                <!-- exp item S-->
                <div class="exp-item work">

                    <!-- show S-->
                        <?php
                        foreach($workexps as $k=>$v){
                            echo '<div class="exp-show">
                        <div class="row">
                            <div class="col-sm-4">
                                <span class="company_name">'.$v->company.'</span>
                            </div>
                            <div class="col-sm-4">
                                <span class="start_time">'.$v->begin_at.'</span> -- <span class="end_time">'.$v->end_at.'</span>
                            </div>
                            <div class="col-sm-4">
                                <span class="job_post">'.$v->job.'</span>
                            </div>
                        </div>
                        <div class="mt10">
                            <div class="description">'.$v->exp.'</div>
                        </div>
                        <a class="edit-job inline" href="javascript:;"data-id="'.$v["id"].'"><i class="iconfont icon-shezhi"></i></a>
                        <a class="del-job inline" href="javascript:;" data-id="'.$v["id"].'"><i class="iconfont icon-lajitong"></i></a>
                    </div>';
                        }
                    ?>
                    <!-- show E-->
                </div>
                <!-- exp item E-->

            </div>

        </section>
		<div style="text-align:center;background:#fff;padding:20px;">
			<a class="preview inline" href="javascript:;" style="padding:10px 20px;background:#12c3f9;color:#fff;">预览简历</a>
		</div>
	</section>
	
	</div>
        <!-- work exp E-->
	

</div>
@section('js')
<script src="/js/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrapValidator.min.js"></script>
<script src="/js/jquery.ui.widget.js"></script>
<script src="/js/jquery.fileupload.js"></script>
<script src="/js/jquery.iframe-transport.js"></script>
<script src="/js/resume.js"></script>
@endsection
@endsection

